﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace DiskSpaceAnalyzer
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            switch (comboBox1.SelectedItem.ToString()) //获取选择的内容
            {

                case "磁盘1":
                    textBox2.Text = "磁盘空间为 238.47GB " +
                        "每扇区 512字节 " +
                        "共 500118192个扇区";
                    break;

                case "磁盘2": 
                    textBox2.Text = "磁盘空间为 1863.02GB " +
                        "每扇区 512字节 " +
                        "共 3907029168个扇区";
                    break;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string text1 = System.IO.File.ReadAllText(@"F:\czxtmm\0.txt");
            string text2 = System.IO.File.ReadAllText(@"F:\czxtmm\1.txt");
            string text3 = System.IO.File.ReadAllText(@"F:\czxtmm\2.txt");
            switch (textBox3.Text)
            {
                case "0":
                    textBox1.Text = text1;
                    break;
                case "2":
                    textBox1.Text = text2;
                    break;
                case "10000":
                    textBox1.Text = text3;
                    break;
            }
        }
    }
}
